﻿<div ng-controller="transferController">
	<div class="wrapper border-bottom white-bg page-heading">
		<div class="col-lg-pull-12">
			<ol class="breadcrumb">
				<li>订单</li>
			</ol>
		</div>
	</div>
	<form class="form-horizontal row">
		<div class="form-group">
			<div class="col-sm-4">
				<label class="col-sm-4 control-label">批号</label>
				<div class="col-sm-8">
					<input name="batch_no" type="text" class="form-control input-sm" ng-model="query.batch_no">
				</div>
			</div>
			<div class="col-sm-4">
				<label class="col-sm-4 control-label">状态</label>
				<div class="col-sm-8">
					<select class="form-control input-sm" ng-model="query.status">
						<option value="">全部</option>
						<option value="1">报盘文件</option>
						<option value="2">报盘通知</option>
						<option value="3">已回盘</option>
						<option value="4">已处理</option>
					</select>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="col-sm-offset-4 col-sm-8">
					<a class="btn btn-primary btn-sm" ui-sref="app.finance.transfer_batch(query)"><i class="fa fa-search"></i> 查询</a>
					<!--<button class="btn btn-primary btn-sm"><i class="fa fa-download"></i> 导出</button>-->
				</div>
			</div>
		</div>
	</form>
	<table class="table table-hover m-t-md">
		<thead>
			<tr style="background-color: #f7f7f9;">
				<th>批号</th>
				<th>通道</th>
				<th>报盘文件</th>
				<th>报盘流水号</th>
				<th>回盘文件</th>
				<th>状态</th>
				<th width="130">操作</th>
			</tr>
		</thead>
		<tbody>
			<tr ng-repeat="item in model.rows">
				<td>{{item.batch_no}}</td>
				<td>{{item.pay_channel}}</td>
				<td>{{item.batch_file}}</td>
				<td>{{item.notice_tran_no}}</td>
				<td>{{item.back_file}}</td>
				<td>{{get_batch_status_name(item.status)}}</td>
				<td>
					<button type="button" ng-if="(item.status==1&&item.pay_channel==1)" ng-click="batch_notify(item)" class="btn btn-primary btn-xs" btn-loading="psdisabled" loading-text="保存中..." ng-disabled="psdisabled">
						<i class="fa fa-feed"></i> 报盘
					</button>
					<button type="button" ng-if="(item.status==2||item.status==3)&&item.pay_channel==1" ng-click="batch_back(item)" class="btn btn-primary btn-xs" btn-loading="psdisabled" loading-text="保存中..." ng-disabled="psdisabled">
						<i class="fa fa-download"></i> 回盘
					</button>
					<button type="button" ng-if="(item.status==2||item.status==3)&&item.pay_channel==7" ng-click="batch_back(item)" class="btn btn-primary btn-xs" btn-loading="psdisabled" loading-text="保存中..." ng-disabled="psdisabled">
						<i class="fa fa-search"></i> 查询
					</button>
				</td>
			</tr>
		</tbody>
	</table>
	<div class="row">
		<div class="col-md-12">
			<uib-pagination total-items="model.total_result" items-per-page="model.size" ng-model="model.page" num-pages="model.total_pages"
							ng-change="search_page(model.page)" class="pagination-sm" boundary-links="true" boundary-link-numbers="true" max-size="20"
							previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
			<span class="pull-right" style="margin: 30px 0px 20px 0px">共{{model.total_result}} 当前：{{model.page}}/{{model.total_pages}}</span>
		</div>
	</div>
</div>
